package com.koron.tool.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: laiguangming
 * @Date: 2022/10/28 10:43
 */
@Getter
@AllArgsConstructor
public enum InventorySituationEnum {

    /**
     * 盘点状态：已盘点
     */
    HAVE_INVENTORY("do", "已盘点"),

    /**
     * 盘点状态：未盘点
     */
    HAVE_NOT_INVENTORY("undo", "未盘点");

    private String value;

    private String description;

    /**
     * 获取枚举的 Map, Entry(value, description)
     * @return
     */
    public static Map<String, String> getMap() {
        Map<String, String> map = new HashMap<>();
        InventorySituationEnum[] enums = InventorySituationEnum.values();
        for (InventorySituationEnum inventorySituationEnum : enums) {
            map.put(inventorySituationEnum.getValue(), inventorySituationEnum.getDescription());
        }
        return map;
    }

}
